﻿using System;
using Ninject.Core;
using Example.Presentation.Kernel;

namespace TestProject1.Kernel
{
    public class MoqDedendencyResolver : IDependencyResolver
    {
        private static IKernel kernel = new StandardKernel(new MoqModule());

        public T GetImplementationOf<T>()
        {
            var retval = kernel.Get<T>();
            kernel.Inject(retval);
            return retval;
        }

        public void Dispose()
        {
            kernel.Dispose();
        }

    }
}
